home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1420_setScalingFactor_method_not_scaling.rtf < prev    next >
Text File  |  1993-11-08  |  2KB  |  43 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw11440
  3. \paperh9000
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;\red84\green84\blue84;\red83\green83\blue83;\red82\green82\blue82;\red81\green81\blue81;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  I have implemented the 
  8. \f1\fs24 setScalingFactor:
  9. \f0\fs28  method of PrintInfo in order to scale my printed output.  It does not seem to be having any effect—my printed output is always 100% of original size.  What could be wrong?\
  10.  
  11. \i     \
  12.  
  13. \i0 A:  Have you set your Window or View subclass to override 
  14. \f1\fs24 knowsPagesFirst:last:
  15. \f0\fs28  to return YES and are you computing your own page rectangles with 
  16. \f1\fs24 getRect:forPage:
  17. \f0\fs28 ?  Then that View is claiming that it knows how to paginate itself and the 
  18. \f1\fs24 setScalingFactor:
  19. \f0\fs28  method of PrintInfo has no effect.  \
  20. \
  21. By not automatically scaling the printing, the AppKit allows you to decide how scaling affects pagination.  Scaling by 50%, for example, should always cause the view to be 50% smaller in both directions, so what was a full-sized page now only takes up a quarter of a page.  However you must decide whether each scaled page continues to be printed on a separate piece of paper or whether you group four of the scaled pages on each piece of paper.\
  22.  \
  23. In either case, the correct way to get your scaled view to print scaled is to override the View method 
  24. \f1\fs24 addToPageSetup
  25. \f0\fs28  and use the 
  26. \f1\fs24 PSscale()
  27. \f0\fs28  pswrap function to set your scaling factor appropriately:\
  28. \
  29.  
  30. \f1\fs24\fc1\cf1     -addToPageSetup\
  31.     \{\
  32.         [super addToPageSetup];\
  33.         PSscale(width_scale, height_scale);\
  34.         return self;\
  35.     \}\
  36.  
  37. \f0\fs28\fc0\cf0 \
  38. QA683\
  39. \
  40. Valid for 1.0, 2.0, 3.0\
  41. \
  42.  
  43.